wrapper._deviceStateChangedId = wrapper.connect('state-changed', Lang.bind(this, function(dev) {
this._syncSectionTitle(dev.category);
}));
- wrapper._destroyId = wrapper.connect('destroy', function(wrapper) {
- wrapper.disconnect(wrapper._activationFailedId);
- wrapper.disconnect(wrapper._deviceStateChangedId);
- wrapper.disconnect(wrapper._destroyId);
- });
let section = this._devices[wrapper.category].section;
section.addMenuItem(wrapper.statusItem);
},
_removeDeviceWrapper: function(wrapper) {
+ wrapper.disconnect(wrapper._activationFailedId);
+ wrapper.disconnect(wrapper._deviceStateChangedId);
wrapper.destroy();
let devices = this._devices[wrapper.category].devices;